package com.jf.utils;

import java.util.Objects;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-08-20
 * Time:1:03
 */
public class Position {
    public final int x;
    public final int y;
    public Position(int x, int y) {
        this.x = x;
        this.y = y;
    }


    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Position p) {
            return x == p.x && y == p.y;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y);
    }
}
